import React from 'react';
import Backdrop from "../backdrop/Backdrop.jsx";
import classes from './Confirm.module.css'
const Confirm = (props) => {
    return (
        <Backdrop className={classes.confirmOuter} onClick={(e) => {props.onCancel(e)}}>
            <div className={classes.confirm}>
                <p>{props.confirmText}</p>
                <div className={classes.buttonBox}>
                    <button
                        onClick={(e) => {props.onCancel(e)}}
                        className={classes.cancel}>取消</button>
                    <button
                        onClick={() => {props.onOk()}}
                        className={classes.ok}>确认</button>
                </div>
            </div>
        </Backdrop>
    );
};

export default Confirm;
